package bufferReader;

import java.io.FileWriter;
import java.io.IOException;
/*
字符流写出数据时,需要调用close()或fulsh(),才能成功写出
 */
public class test_write {
    public static void main(String[] args) throws IOException {
        FileWriter fileWriter=new FileWriter("D:\\java\\JavaMaterial\\1.txt");
        fileWriter.write(97);
        char[]chars={97,98,99};
        fileWriter.write(chars);
        fileWriter.write(chars,0,1);
        fileWriter.write("nihao");
        fileWriter.write("你好",0,1);
        fileWriter.flush();
    }
}
